<template>
<div>
        <el-row>
          <el-col :span="8">
            <div class="label-mes">工单编码
              <label >{{form.workorderCode}}</label>
             </div>
          </el-col>
          <el-col :span="8">
            <div class="label-mes">工单名称
              <label >{{form.workorderName}}</label>
            </div>
          </el-col>
          <el-col :span="8">
            <div class="label-mes">产品编码
              <label >{{form.itemCode}}</label>
            </div>
          </el-col>
        </el-row>
          <el-row>
            <el-col :span="8">
              <div class="label-mes">产品名称
                <label >{{form.itemName}}</label>
              </div>
            </el-col>
            <el-col :span="8">
              <div class="label-mes">单位
                <label >{{form.unitOfMeasure}}</label>
              </div>
            </el-col>
            <el-col :span="8">
              <div class="label-mes">规格型号
                <label >{{form.specification}}</label>
              </div>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="8">
              <div class="label-mes">任务编号
                <label >{{form.taskCode}}</label>
              </div>
            </el-col>
            <el-col :span="8">
              <div class="label-mes">任务名称
                <label >{{form.taskName}}</label>
              </div>
            </el-col>
            <el-col :span="8">
              <div class="label-mes">工作站
                <label >{{form.workstationCode}}</label>
              </div>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="8">
              <div class="label-mes">报工数量
                <label >{{form.quantityCheck}}</label>
              </div>
            </el-col>
            <el-col :span="8">
              <div class="label-mes">图纸
                <el-button type="text" @click="handleView()">查看</el-button>
              </div>
            </el-col>
          </el-row>

      <el-dialog :visible.sync="pdfOpen" width="1300px" append-to-body>
        <PdfView ref="pdfView" :taskId="form.taskId"></PdfView>
      </el-dialog>
</div>
</template>
<script>
import PdfView from "@/components/pdfView/index.vue";
export default {
  name: "pqcInfo",
  components: {PdfView},
  props: {
   form: {
     type: Object,
     default: function() {
       return {
         id: null,
         taskId: null,
         workorderId: null,
         workorderCode: null,
         workorderName: null,
         taskCode: null,
         taskName: null,
         workstationId: null,
         workstationCode: null,
         itemId: null,
         itemCode: null,
         itemName: null,
         specification: null,
         unitOfMeasure: null,
         quantityCheck: null,
         quantityPass: null,
       }
     }

     }
  },
  data() {
    return {
      pdfOpen:false,
    }
  },

  methods: {
    // 查看图纸
    handleView() {
      this.pdfOpen = true;
    },
  }
}
</script>

